package com.mh.www.mh_frame.util;

import android.os.Environment;

import java.io.File;

/**
 *
 * sd卡的辅助工具类
 * Created by think on 2017/6/21.
 */

public class SDCardUtil {
    private SDCardUtil()
    {
               throw new UnsupportedOperationException("cannot be instantiated");
           }

    /**
     * 判断sd卡是否存在
     * @return
     */
   public static boolean isSDCardEndable(){
       return Environment.getExternalStorageState().equals(Environment.MEDIA_MOUNTED);
   }

    /**
     * 获取sd卡路径
     * @return
     */
   public static String getSDCardPath(){
       return Environment.getExternalStorageDirectory().getAbsolutePath()+ File.separator;
   }

    /**
     * 获取系统存储路径
     * @return
     */
    public static String getRootDirectoryPath()
  {
      return Environment.getRootDirectory().getAbsolutePath();
  }


}
